#include <iostream>
#define S(num) num * num

using namespace std;

/*//inline int S(int);
int main() {
    //5 + 10 * 5 + 10
    int result1 = S(5 + 10);
    //double result2 = S(2.5);
    cout << result1 << endl;
    //cout << result2 << endl;

    return 0;
}*/
/*int S(int num){
    return num * num;
}*/

int& sum(int& num1, int& num2){ //?????
    num1++;
    num2++;
    num1++;
    return num1;
}
int main(){
    int num1 = 10, num2 = 15;
    int& result = sum(num1, num2);
    cout << "result = " << result << endl;
}


/*int& sum(){
    int num = 10;
    int& rNum = num;
    return rNum;
}
int main(){
    int result = sum();
    cout << "result = " << result << endl;
}*/



/*void Swap1(int, int );
void Swap2(int*, int* );
void Swap3(int&, int& );

int main(){
    int num1 = 10, num2 = 5;
    Swap1(num1, num2);
    cout << "执行Swap1后：" << num1 << "\t" << num2 << endl;
    Swap2(&num1, &num2);
    cout << "执行Swap2后：" << num1 << "\t" << num2 << endl;
    Swap3(num1, num2);
    cout << "执行Swap3后：" << num1 << "\t" << num2 << endl;
}
void Swap1(int num1, int num2){
    int temp;
    temp = num1;
    num1 = num2;
    num2 = temp;
}
void Swap2(int* p1, int* p2){
    int temp;
    temp = *p1;
    *p1 = *p2;
    *p2 = temp;
}
void Swap3(int& ref1, int& ref2){
    int temp;
    temp = ref1;
    ref1 = ref2;
    ref2 = temp;
}*/



